create table jms_dm.dm_download_repeat_outscan_detail_dt (
                                                             agent_code varchar(30) comment '代理区code',
                                                             site_code varchar(30) comment '扫描网点',
                                                             waybill_no varchar(30) comment '单号',
                                                             agent_name varchar(30) comment '代理区name',
                                                             scan_time datetime comment '扫描时间',
                                                             scan_type varchar(30) comment '扫描类型',
                                                             site_name varchar(80) comment '扫描网点名称',
                                                             store_code varchar(30) comment '门店编码',
                                                             store_name varchar(120) comment '门店名称',
                                                             is_work_order tinyint comment '是否客诉 1是',
                                                             is_flas_sign tinyint comment '是否虚假签收 1是',
                                                             apply_type_code tinyint comment '退转类型4退件5转寄',
                                                             is_sign_del tinyint comment '是否签收删除1是',
                                                             reback_apply_time datetime comment '退转申请时间',
                                                             date_time date comment'查询时间'
) ENGINE=OLAP
DUPLICATE KEY(agent_code,site_code)
COMMENT "下载中心_重复出库"
PARTITION BY RANGE(date_time)
(START ("2023-10-01") END ("2023-10-15") EVERY (INTERVAL 1 day))
DISTRIBUTED BY HASH(agent_code) BUCKETS 2
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-14",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "2",
"in_memory" = "false",
"storage_format" = "V2"
);
